#ifndef __FUNC_TREE_PLUGIN_H__
#define __FUNC_TREE_PLUGIN_H__

class QTreeWidgetItem;

#include <QtCore/QObject>

#include "juffed/JuffPlugin.h"

class FuncTree : public QObject, public JuffPlugin {
Q_OBJECT
Q_INTERFACES(JuffPlugin)
public:
	FuncTree();
	virtual ~FuncTree();

	//	info
	virtual QString name() const;
	virtual QString description() const;
	virtual QString targetEngine() const;

	//	controls
	virtual QWidgetList dockList() const;

	virtual void onDocCreated(const QString& fileName);
	virtual void onDocActivated(const QString& fileName);
	virtual void onDocModified(const QString& fileName, bool modified);
	virtual void onDocClosed(const QString& fileName);
	virtual void onDocRenamed(const QString& oldFileName, const QString& newFileName);
	virtual void onTabMoved(int from, int to);

	virtual void applySettings();

protected slots:
	void curItemChanged(QTreeWidgetItem*, QTreeWidgetItem*);
	void countTags();
	void onItemDoubleClicked(QTreeWidgetItem*, int);

private:
	class Panel;
	Panel* panel_;
};

#endif
